package com.example.springboot.service;


import com.example.springboot.entity.notifications;
import com.example.springboot.entity.students;
import com.example.springboot.mapper.NotificationMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;


@Service
public class NotificationService {

    @Autowired
    private NotificationMapper notificationMapper;


    public List<notifications> getAllNotifications() {
        return notificationMapper.getAllNotifications();
    }


    public notifications getNotificationById(int notificationId) {
        return notificationMapper.getNotificationById(notificationId);
    }


    public void addNotification(notifications notification) {
        notificationMapper.insertNotification(notification);
    }


    public void updateNotification(notifications notification) {
        notificationMapper.updateNotification(notification);
    }


    public void deleteNotification(int notificationId) {
        notificationMapper.deleteNotification(notificationId);
    }

    public List<students> findStuList() {
       return notificationMapper.findStuList();
    }

    public void batchDeleteNotifications(List<Long> ids) {
        notificationMapper.batchDeleteN(ids);
    }

}
